var huitui = getItemValue("huitui"); //是否首次
var flag = false;
if (huitui == 0) { //首次提交
    var shouci = getItemValueAsString("shouci");
    if (isNotNull(shouci) && shouci.indexOf("验收测试报告") >= 0) {
        flag = true;
    }
} else { //非首次提交
    var number = getItemValueAsString("number");
    var sql = "SELECT son.* FROM tlk_application_system_change_son son WHERE son.parent = ( SELECT p.id FROM tlk_application_system_change p WHERE p.item_number = '" + number + "' ) AND son.item_cishu = '" + huitui + "'";
    println("这里是流程里的sql，据说有问题：" + sql);
    var datas = findBySQL(sql);
    if (datas != null) {
        var feishouci = datas.getItemValueAsString("feishouci");
        if (isNotNull(feishouci) && feishouci.indexOf("验收测试报告") >= 0) {
            flag = true;
        }
    }
}
flag;